﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Methods;

namespace AMatysiakTest.Methods.TypeExtensions
{
    [TestClass]
    public class ToShortDateTest
    {
        [TestMethod]
        public void currentDate()
        {
            string calc = DateTime.Now.ToString().ToShortDate();
            string expected = DateTime.Now.ToShortDateString();

            Assert.AreEqual(expected, calc);
        }

        [TestMethod]
        public void parseDate()
        {
            string date = "2010-10-10 05:55:22";
            string calc = date.ToShortDate();
            string expected = DateTime.Parse(date).ToShortDateString();

            Assert.AreEqual(expected, calc);
        }
    }
}
